livecodefandomcom_de-20200214-history
Move
Moves an object(glossary) from one location to another.Syntax: move {from to |to |relative } \ in {messages | waiting} Examples: move image "sprite" to the mouseLoc in 30 ticks move button ID 4 relative 50,50 without waiting move stack "Overview Palette" from 100,30 to 0,30 without messages move the mouseControl to the points of graphic "Polygon" in 10 seconds Use the move command to animate controls or windows by moving them smoothly across the screen. Use the move...relative form of the move command to move an object(glossary) in a straight line a certain distance from its current location. Use the move...from startLoc to endLoc form to move an object in a straight line from one location to another, without regard to where the object(glossary) started. Use the move...to pointList form to move an object along a set of defined points. If you specify without messages, built-in messages are not delivered during the move. If you specify without waiting, the current handler continues immediately, and a moveStopped message is sent when the move is completed. Otherwise, the handler pauses until the move is complete. If you issue another move command while a previous move command for the same object(glossary) is still executing, the previous move command is halted, and the second move command starts up at the object's current location. To move multiple objects at the same time, set the lockMoves property to true before issuing the move commands. When you set the lockMoves back to false, all the pending moves begin at once. *Tip:* To easily move an object(glossary) along a curved path, create a curve graphic using the freehand Curve tool, then use a statement like the following to move the object(glossary) : move button "My Button" to the points of graphic "My Curve" If you like, you can hide the graphic so that the object follows the invisible curve, but its path is not visible on screen. Parameters: *object: Any visible control or open stack reference. (You can specify a cardwith the move command, but moving a card has no effect.) *startLoc: An expression that evaluates to a point--a vertical and horizontaldistance from the top left of the current stack, separated by a comma.(If the object is a stack, the distance is from the top left of thescreen.) The object is shown at the startLoc before the move begins. Ifno startLoc is specified, the move starts at the object's currentlocation. *endLoc: An expression that evaluates to a point. *pointList: A return-separated list of destination points. The object is moved toeach point in turn during the move. *motion: The motion consists of a horizontal number of pixels and a verticalnumber of pixels, separated by a comma. A positive number moves theobject to the left or down; a negative number moves it to the right orup. *time: The time specifies a total time for the move to take from start to end,in milliseconds, seconds, or ticks. If you do not specify a time, thespeed of the move is determined by the moveSpeed property. See also: stop moving (command),unlock moves (command),movingControls (function),moveStopped (message),control (object),lockMoves (property),syncRate (property),moveSpeed (property),location (property),points (property),number (property),lowResolutionTimers (property), Category: multimedia